package com.sie.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sie.demo.entity.RoleMenu;
import com.sie.demo.entity.vo.SetRoleMenuVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author liaozhifeng
 * @date 2021/8/11 9:38
 * @Version 1.0
 */
@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {
    //    根据角色id查询所拥有的菜单
    List<Integer> selectMenuByRoleId(Integer roleId);

    //    设置角色的权限先删除原有菜单权限
    Integer deleteByRoleId(Integer userId);
    //    删除完用户原有的菜单权限更新角色的权限
    Integer addMenuByRoleId(SetRoleMenuVo setRoleMenuVo);
}
